export interface Problem {
  id: number;
  _id: string;
  title: string;
  description: string;
  input_description: string;
  output_description: string;
  time_limit: number;
  memory_limit: number;
  difficulty: 'Low' | 'Mid' | 'High';
  visible: boolean;
  tags: Object[];
  languages: string[];
  template: Record<string, any>;
  samples: Sample[];
  test_case_id?: string;
  test_case_score?: TestCaseScore[];
  rule_type: 'ACM' | 'OI';
  io_mode: IOMode;
  spj: boolean;
  spj_language?: string;
  spj_code?: string;
  hint?: string;
  source?: string;
  contest_id?: number;
  user_status?: boolean | null;  // true: 通过, false: 未通过, null: 未答题
  submission_number?: number;    // 总提交数
  accepted_number?: number;      // 通过数
}

export interface Sample {
  input: string;
  output: string;
}

export interface TestCaseScore {
  input_name: string;
  output_name: string;
  score: number;
}

export interface IOMode {
  io_mode: 'Standard IO' | 'File IO';
  input?: string;
  output?: string;
}

export interface ProblemListResponse {
  count: number;
  next: string | null;
  previous: string | null;
  current_page: number;
  total_pages: number;
  page_size: number;
  has_next: boolean;
  has_previous: boolean;
  results: Problem[];
}

// 创建题目的步骤
export type ProblemStep = 'basic' | 'testcase' | 'preview'; 